import request from '@/utils/request'

// 关联工艺回显
export const GetProcessViewAPI = params => {
  return request({
    url: '/production/spunlaceOrder/processView',
    method: 'GET',
    params
  })
}

// 关联工艺保存
export const ProcessSaveAPI = data => {
  return request({
    url: '/production/spunlaceOrder/processSave',
    method: 'POST',
    data
  })
}

// 停产
export const StopAPI = data => {
  return request({
    url: '/production/spunlaceOrder/ldle',
    method: 'PUT',
    data
  })
}

// 关结
export const CloseAPI = data => {
  return request({
    url: '/production/spunlaceOrder/close',
    method: 'PUT',
    data
  })
}

// 复产
export const ProlificAPI = data => {
  return request({
    url: '/production/spunlaceOrder/prolific',
    method: 'PUT',
    data
  })
}

// 查看
export const GetViewAPI = data => {
  return request({
    url: '/production/spunlaceOrder/view/' + data,
    method: 'GET'
  })
}

// 列表
export const GetListAPI = params => {
  return request({
    url: '/production/spunlaceOrder/list',
    method: 'GET',
    params
  })
}

// 工艺确认回显
export const ProcessAffirmViewAPI = params => {
  return request({
    url: '/production/spunlaceOrder/processAffirmView',
    method: 'GET',
    params
  })
}

// 工艺确认
export const ProcessAffirmAPI = data => {
  return request({
    url: '/production/spunlaceOrder/processAffirm',
    method: 'POST',
    data
  })
}

// 工艺确认
export const GetLinemAPI = params => {
  return request({
    url: '/production/process/getLine',
    method: 'GET',
    params
  })
}

// 根据类别查询模板列表
export const GettypeListAPI = params => {
  return request({
    url: '/system/printConfig/typeList',
    method: 'GET',
    params
  })
}

// 标签绑定
export const savePrintTempleteAPI = data => {
  return request({
    url: '/production/spunlaceOrder/savePrintTemplete',
    method: 'POST',
    data
  })
}
